<!DOCTYPE html>
<html>
<head>
	<title>进度条</title>
</head>
<body>

	<div style="margin-top: 200px;margin-left: 100px;">

	<button id="bt" onclick="strat()" style="width: 50px;height: 50px;border: 1px solid #555;background: red;">加载</button>

	<div style="width: 1000px;margin:0 auto;border: 1px solid red;height: 50px;float: left;" >

		<div id="box"  style="height: 50px;background: #ccc;width: 0px;">
			
		</div>
		
	</div>

	</div>
	<script type="text/javascript">

		
	 var m = 0;
        function strat() {
            var div = document.getElementById('box');
            // console.log(div);
            
            m++;
            div.style.width = m+'px';

            if (m >= 1000) {
                
                return;
            }
            timer = setTimeout('strat()', 5);
        }


		


        


	</script>

</body>
</html>